﻿
@{
    ViewBag.Title = Resources.WebStringsWeb.WebTitle;
    Layout = "~/Views/Shared/_LayoutMobile.cshtml";
}

@section css {
    <link href="~/Assets/css/previewImage.css" rel="stylesheet" />
    <link href="~/Assets/css/mui.picker.min.css" rel="stylesheet" />
    <script src="~/Assets/js/mui.picker.js"></script>
    <script src="~/Assets/js/mui.picker.min.js"></script>
    <script src="~/Assets/js/mui.dtpicker.js"></script>
    <style>
        .mui-bar ~ .mui-content .mui-scroll-wrapper {
            top: 44px;
            height: auto;
        }

        .btn_addPic {
            display: block;
            position: relative;
            width: 53px;
            height: 53px;
            overflow: hidden;
            cursor: pointer;
            text-align: center;
        }

        .filePrew {
            display: block;
            position: absolute;
            top: 0;
            left: 0;
            width: 53px;
            height: 53px;
            opacity: 0;
        }
    </style>
}
<header class="mui-bar mui-bar-nav">
    <button type="button" class="mui-left mui-action-back mui-btn mui-btn-link mui-btn-nav mui-pull-left" style="color:white;">
        <span class="mui-icon mui-icon-left-nav" style=""></span>
    </button>
    <h1 class="mui-title" style="color:white;">问题上报</h1>
</header>

<div class="mui-content" style="margin: 5px;" ng-cloak ng-controller="IssueReportController" ng-init="
     Guest = '@(Request.QueryString["g"].IsEmpty() ? "0" : Request.QueryString["g"])';
     RoomId = '@(Request.QueryString["RoomId"].IsEmpty() ? "" : Request.QueryString["RoomId"])';
     PlaceId='@(Request.QueryString["PlaceId"].IsEmpty() ? "" : Request.QueryString["PlaceId"])';
     PlaceName='@(Request.QueryString["PlaceName"].IsEmpty() ? "" : Request.QueryString["PlaceName"])';
     PageName='@(Request.QueryString["PageName"].IsEmpty() ? "" : Request.QueryString["PageName"])';
      AddModel={};
     InitParkPlace(PlaceId,AddModel);
     ImageCount=[0,1,2,3,4];
     FileList=[];
     FileObjList=[];
     InitImgeUpload();
     GetParkList();
     AddModel.PlaceId = PlaceId;
     AddModel.RoomId = RoomId;
     AddModel.PlaceName=PlaceName;
     MGetResponsible(PlaceId);
     ">
    <form class="mui-input-group">
        <div class="mui-input-row">
            <label>园区</label>
            <select ng-model="AddModel.ParkId" ng-change="MGetPlaceList(AddModel.ParkId);">
                <option value="">请选择园区</option>
                <option ng-repeat="x in ParkList" value="{{x.Id}}">{{x.ParkName}}</option>
            </select>
        </div>
        <div class="mui-input-row">
            <label>场所</label>
            <select ng-model="AddModel.PlaceId" ng-change="MGetResponsible(AddModel.PlaceId);">
                <option value="">请选择场所</option>
                <option ng-repeat="x in PlaceList" value="{{x.Id}}">{{x.PlaceName}}</option>
            </select>
        </div>
        <div class="mui-input-row">
            <label>场所责任人</label>
            <label control-label" style="width: 60%; text-align: left; padding-left: 0px;">{{PlaceUser.Responsible.UserName}} <a href="tel:{{PlaceUser.Responsible.Phone}}">{{PlaceUser.Responsible.Phone}}</a></label>
        </div>
        <div class="mui-input-row">
            <label>部门负责人</label>
            <label control-label" style="width: 60%; text-align:left;padding-left:0px;">{{PlaceUser.DepartmentManger.UserName}} <a href="tel:{{PlaceUser.DepartmentManger.Phone}}">{{PlaceUser.DepartmentManger.Phone}}</a></label>
        </div>
    </form>
    <h5 class="mui-content-padded">报告层级</h5>
    <form class="mui-input-group">
        <div class="mui-input-row mui-checkbox mui-left">
            <label>责任部门</label>
            <input name="checkbox" value="Item 1" type="checkbox" checked disabled>
        </div>
        <div class="mui-input-row mui-checkbox mui-left">
            <label>安委办</label>
            <input name="checkbox" value="Item 2" type="checkbox" id="level2">
        </div>
    </form>
    <div class="mui-input-row" style="margin: 10px 5px;">
        <textarea id="textarea" rows="5" placeholder="问题描述" ng-model="AddModel.Description"></textarea>
    </div>
    <p>添加照片</p>
	<div class="row image-list">
		<img id="upload_{{x}}" ng-repeat="x in ImageCount" ng-click="InitLxUpload('upload_',x);" src="../../Assets/img/upload.png" class="img-item space" style="width:55px;height:auto;margin:5px;" alt="" title="">
	</div>
    <div class="row image-list" style="margin-top:20px;margin-bottom:50px;display:none;">
        <div style="float:left;margin-left:10px;" ng-repeat="x in ImageCount" id="imagebox_{{x}}">
        </div>
    </div>
    <div class="mui-button-row" style="margin-top:150px;">
        <button type="button" ng-click="MAddIssueReport(AddModel,PageName,Guest);" ng-disabled="Loading" class="mui-btn mui-btn-primary mui-btn-block">保 &nbsp;&nbsp;存</button>
    </div>
    <div style="height:80px;"></div>
</div>
@section js{
    <script src="~/Assets/js/base/app-jssdk.umd.min.js"></script>
    <script src="~/Assets/js/libs/upload.js?v=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
    <script src="~/Assets/js/mui.zoom.js"></script>
    <script src="~/Assets/js/mui.previewimage.js"></script>
    <script src="~/Assets/js/pg/IssueReport.js?v=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
    <script>

        mui.showLoading("正在加载..", "div");

        setTimeout(function () {
            mui.hideLoading();
            mui.previewImage();
        }, 1000);

        function phone(date) {
            window.location.href = 'tel://' + date
        }
    </script>
}
